package com.gaofans.vertx.boot.web.route;

import io.vertx.ext.web.Route;

import java.util.Objects;
import java.util.function.BiConsumer;

/**
 * 直接配置router
 * @author GaoFans
 */
public interface RouterConfigurer extends BiConsumer<RouteDefinition,Route> {

    @Override
    default BiConsumer<RouteDefinition, Route> andThen(BiConsumer<? super RouteDefinition, ? super Route> after) {
        Objects.requireNonNull(after);
        return (l, r) -> {
            accept(l, r);
            after.accept(l, r);
        };
    }
}
